package top.ysh.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import top.ysh.consumer.config.MyRule;

@SpringBootApplication
@EnableEurekaClient
@EnableDiscoveryClient  // 激活DiscoveryClient，新版本可以不写
// 配置Ribbon负载均衡策略
/**
 * name:设置服务提供方应用名称
 * configuration:负载均衡策略的bean
 *
 */
// @RibbonClient(name = "EUREKA-PROVIDER",configuration = MyRule.class)
public class ConsumerApp {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApp.class,args);
    }
}
